{% extends '@WebsiteBundle/layout/layout.html.twig' %}
{% import "@WebsiteBundle/macros/pagination.html.twig" as macros %}
 {% block page %}
   {{ parent() }}
   <div id="main" class="myMain">
     <div class="layui-main">
       <div class="layui-row layui-col-space20">
         <div class="layui-col-md2">
           {{ render(path('app_user_userNav', {route:route})) }}
         </div>
         <div class="layui-col-md10">
           <div class="wrap">
             <div class="header">
               <a href="javascript:window.history.back();" class="blue"><span class="layui-icon layui-icon-return"></span></a>
             </div>
             <div class="content">

               <div class="orderDetail">
                 <div class="title">基本信息</div>
                 <div class="list">
                   <div class="layui-row  layui-col-space20">
                     <div class="layui-col-md6">订单编号：{{ order['orderNo'] }}</div>
                     <div class="layui-col-md6">订单状态：<span class="pay_success">{{ order['orderStatusView'] }}</span></div>
                   </div>
                   <div class="layui-row  layui-col-space20">
                     <div class="layui-col-md6">下单时间：{{ date_time(order['createdAt']) }}</div>
                     {% if order['couponSn'] is defined %}   <div class="layui-col-md6">使用优惠码：{{ order['couponSn'] }}</div> {% endif %}
                   </div>
                 </div>

               </div>
               {% if order['goods'] %}
               <div class="goodsDetail">
                 <div class="title">商品信息</div>
                 <div class="list">
                   {% for gv in order['goods'] %}
                     <div class="layui-row  layui-col-space20">
                       <div class="layui-col-md6"> {{ gv['name'] }}</div>
                       <div class="layui-col-md6"><span class="fontColorRed">¥{{ gv['shopPrice']/100 }}</span></div>
                     </div>
                   {% endfor %}
                 </div>

               </div>
               {% endif %}

               {% if order['orderStatus'] == 2 %}
               <div class="payDetail">
                 <div class="title">支付信息</div>
                 <ul>
                   <li>支付方式：{{ order['paywayView'] }}</li>
                   <li>原价：<span class="fontColorRed">¥{{ order['originalAmount'] }}</span></li>
                   <li>支付时间：{{ date_time(order['pay']['payTime']) }}</li>
                   <li>优惠金额：<span class="fontColorRed">¥{{ order['discountAmount'] }}</span></li>

                   <li class="order_payment">实付金额：<span class="fontColorRed">¥{{ order['orderAmount'] }}</span></li>

                   {% if order['orderAgreementId'] %}
                     <li class="see_contract_hide">
                       <a class="see_contract js_show_agreement" href="#" target="_blank">查看协议</a>
                     </li>
                   {% endif %}
                 </ul>
               </div>
               {% endif %}

             </div>
           </div>
         </div>
       </div>
     </div>
   </div>
 {% endblock %}
